//
//  AppDelegate.swift
//  微博Swift
//
//  Created by apple on 15/9/21.
//  Copyright © 2015年 cc. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        
        window = UIWindow(frame: UIScreen.mainScreen().bounds)

        window?.backgroundColor = UIColor.whiteColor()
        
        // 实例化控制器，会调用viewDidLoad()方法
        window?.rootViewController = MainViewController()
        // 让根控制器的视图可见 viewWillAppear()
        window?.makeKeyAndVisible()
        
        // 设置全局外观
        setupAppearance()
        return true
    }

    func setupAppearance() {
        UINavigationBar.appearance().tintColor = WBAppearanceColor
        UITabBar.appearance().tintColor = WBAppearanceColor
    }
}

